package com.spring.demo.webflux.demo.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wangzhilong
 * @date 2021/2/25
 */
@RestController
@RequestMapping("/push")
public class PushDataController {

    private Logger log = LoggerFactory.getLogger(this.getClass());

    @PostMapping("/data/test")
    public String test(@RequestBody String data) {
        log.info("接收到的消息test：{}",data);
        return "ok";
    }

    @PostMapping("/data/demo")
    public String demo(@RequestBody String data) {
        log.info("接收到的消息demo：{}",data);
        return "ok";
    }

    @PostMapping("/data/product")
    public String product(@RequestBody String data) {
        log.info("接收到的消息product：{}",data);
        return "ok";
    }

}
